package com.coders.StringBuffer;

public class StringBufferFunctions {
	public static void main(String args[]){
		StringBuffer sb1= new StringBuffer("Welcome"); 
		StringBuffer sb2= new StringBuffer("100"); 
		StringBuffer sb3= new StringBuffer();
		System.out.println("Capacity of StringBuffer 'Welcome': "+sb1.capacity());
		System.out.println("Capacity of StringBuffer 100: "+sb2.capacity());
		System.out.println("Capacity of default StringBuffer: "+sb3.capacity());
		System.out.println("Length of 'Welcome'"+sb1.length());
		System.out.println("Character at 4th position in 'Welcome'"+sb1.charAt(3));
		sb1.setCharAt(3, 'C');
		System.out.println("Changing  'c' in 'Welcome' :"+sb1);
		sb3.append(" To Java String Buffer");
		System.out.println("Appended String:"+sb3);
		sb3.reverse();
		System.out.println("Reversed Appended String : " + sb3);

}
}
